package heliotrope.utils
{
	import flash.errors.IllegalOperationError;
	import heliotrope.global.ErrorHandler;

	/**
	 * 存储方向的类，方向依指南针序<br>
	 * 
	 *				N
	 *			NW		NE
	 * 		 W      C       E
	 *			SW		SE
	 *				S
	 * */
	public final class CompassDirection
	{
//		CONFIG::debug{private static var instanceCounter:int = 0;}
		public static const NW:CompassDirection			= new CompassDirection;
		public static const  N:CompassDirection			= new CompassDirection;
		public static const NE:CompassDirection			= new CompassDirection;
		public static const  E:CompassDirection			= new CompassDirection;
		public static const SE:CompassDirection			= new CompassDirection;
		public static const  S:CompassDirection			= new CompassDirection;
		public static const SW:CompassDirection			= new CompassDirection;
		public static const  W:CompassDirection			= new CompassDirection;
		public static const  CENTER:CompassDirection 	= new CompassDirection;
		public function CompassDirection()
		{
			CONFIG::debug
			{
				try
				{
					if(CENTER!=null) throw new IllegalOperationError("Can not initial new CompassDirection instance.");
				} 
				catch(error:IllegalOperationError) 
				{
					ErrorHandler.handle(error);
				}
			}
		}
	}
}